<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<!DOCTYPE html>
<html>

	<head>
		<meta charset="utf-8">
		<title>杰利联合</title>
		<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
		<meta content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" name="viewport">
		<meta content="application/xhtml+xml;charset=UTF-8" http-equiv="Content-Type">
		<meta content="no-cache,must-revalidate" http-equiv="Cache-Control">
		<meta content="no-cache" http-equiv="pragma">
		<meta content="0" http-equiv="expires">
		<meta content="telephone=no, address=no" name="format-detection">
		<meta name="apple-mobile-web-app-capable" content="yes">
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
			<link href="https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
		<link rel="stylesheet" type="text/css" href="${ctxStatic}/jiu/css/mobile_module.css?v=1492676217" media="all">
		<script type="text/javascript" src="${ctxStatic}/jiu/js/jquery-2.0.3.min.js"></script>
		<!-- 加载 Bootstrap 的所有 JavaScript 插件。你也可以根据需要只加载单个插件。 -->
<script
	src="https://cdn.bootcss.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
		<link href="${ctxStatic}/jiu/css/common.css?v=1492676217" rel="stylesheet" type="text/css">		
		<link rel="stylesheet" href="${ctxStatic}/jiu/css/pingjia.css"/>
		<style>
				.hearder{
				height: 50px;
				background-color: #30B0F3;
				width: 100%;
				text-align: center;
				color: white;
				font-size: 20px;
                line-height:50px;
                position: fixed;
			    top: 0;
			    z-index: 1;
			}
			.shang {
				display: flex;
				display: -webkit-flex;
				justify-content: flex-start;
				align-items: center;
				margin-top: 60px;
				margin-left: 5px;
				margin-right: 5px;
				border-bottom: 1px #DFDFDF solid;
				padding: 10px;
			}
			
			.name {
				font-size: 16px;
			}
			
			.ping1 {
				font-size: 16px;
				padding: 5px;
				margin-top: 15px;
				color: #666666;
				margin-left: 5px;
			}
			
			.clearfix::after {
				display: block;
				content: '';
				height: 0;
				overflow: hidden;
				clear: both;
			}
				
			.atar_Show {
				background: url(${ctxStatic}/jiu/img/stark3.png);
				width: 180px;
				height: 29px;
				position: absolute;
				left: 50%;
				margin: 0px 0 0 -90px;
			}
			
			.atar_Show p {
				background: url(${ctxStatic}/jiu/img/stars3.png);
				left: 0;
				height: 29px;
				width: 134px;
			}
			
			.p1 {
				color: #AAAAAA;
			}
			
			.p1 span {
				color: #DFDFDF;
			}
			
			select.ui-choose {
				display: none;
			}
			
			ul.ui-choose {
				box-sizing: border-box;
				display: inline-block;
				border: 1px solid transparent;				
				border-right: none;
				border-bottom: none;
				font-size: 14px;
				margin: 0;
				padding: 0;
				list-style: none;
				vertical-align: middle;
				-webkit-user-select: none;
				-moz-user-select: none;
				-ms-user-select: none;
				user-select: none;
			}
			
			ul.ui-choose:after {
				content: "";
				display: table;
				clear: both;
			}			
			ul.ui-choose>li {
				border-radius: 3px;
				box-sizing: border-box;
				border: 1px solid #ccc;
				float: left;
				height: 30px;
				line-height: 30px;
				margin: 8px 5px 5px 10px;
				padding: 0 8px;
				cursor: pointer;
				position: relative;
				z-index: 1;
				min-width: 20px;
				text-align: center;
			}								
		</style>
	</head>
	<body style="background-color: white;">
		<header  class="hearder" style="">
			<a href="javascript:window.history.go(-1)">
				<img src="${ctxStatic}/jiu/img/fanhui.png" style="height: 20px;color: white;top:15px;position: absolute;left: 10px;"/></a>
			评价详情
	    </header>
	    		<div class="modal fade" style="margin-top: 30%;" id="myModal"
			tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
			<div class="modal-dialog" role="document">
				<div class="modal-content">
					<div class="modal-header" style="width:100%;position:relative">
						<button type="button" class="close" data-dismiss="modal"
							aria-label="Close" style="position:absolute;right:10px;text-align:right">
							<span aria-hidden="true">&times;</span>
						</button>
						<h4 class="modal-title" id="myModalLabel">操作提示</h4>
					</div>
					<div class="modal-body"></div>
					<div class="modal-footer" style="display:flex;justify-content:space-between;" >
						<button type="button" class="btn btn-success" data-dismiss="modal"
							id="yes" style="width:100px">确定</button>
						<button style="width:100px" type="button" class="btn btn-danger" data-dismiss="modal"
							id="no">取消</button>
					</div>
				</div>
			</div>
		</div>
	  <%--  	<div class="shang"  style="position: relative;">
			<div style="height: 90px;width: 120px;">
				<img src="${ctxUser }/jiu/${jiuOrder.manufactorLogo}" style="width: 100%;height:90px;border-radius: 3px;">
			</div>
			<div style="margin-left: 10px;line-height: 25px;">
				<p class="name">${jiuOrder.storeName}</p>
				<p class="property" style="font-size: 15px;margin-top: 15px;">
					<span class="colorless">价格</span>
					<span class="orange">${jiuOrder.totalPrice}积分</span>
				</p>
				<p class="property" style="">
					<span class="colorless">数量</span>
					<span>${jiuOrder.orderNum}</span>
				</p>
				
			</div>
		
			<div style="position: absolute;right: 10px;top: 5px;">
				<p style="text-align: right;">
					<img src="${ctxStatic }/jiu/ratingimg/${factorjermsg.creditRating.ratingpic }" style="height: 15px;"/>
				</p>
			</div>
			
			<div class="zhibiao" style="bottom: 10px;font-size: 12px;line-height: 20px;text-align: right;">
				<p>销量&nbsp;${factorjermsg.salesnum }</p>
				<p>综合评价<span style="color: #ff9000;font-size: 14px;">&nbsp;${factorjermsg.allscore }</span></p>
			</div>
		</div> --%>
		
		
		<div class="shang"  style="position: relative;">
			<div style="height: 90px;width: 120px;">
				<img src="${store.headimgurl}" style="width: 100%;height:90px;border-radius: 3px;">
			</div>
			<div style="margin-left: 10px;line-height: 25px;">
				<p class="name">${jiuOrder.storeName}</p>
				<p class="property" style="font-size: 15px;margin-top: 15px;">
					<span class="colorless">价格</span>
					<span class="orange">${jiuOrder.totalPrice}积分</span>
				</p>
				<p class="property" style="">
					<span class="colorless">数量</span>
					<span>${jiuOrder.orderNum}</span>
				</p>
				
			</div>
		
			<div style="position: absolute;right: 10px;top: 5px;">
				<p style="text-align: right;">
					<img src="${ctxStatic }/jiu/ratingimg/${storejermsg.creditRating.ratingpic }" style="height: 15px;"/>
				</p>
			</div>
			
			<div class="zhibiao" style="bottom: 10px;font-size: 12px;line-height: 20px;text-align: right;">
				<p>消费次数&nbsp;${storejermsg.salesnum }</p>
				<p>综合评价<span style="color: #ff9000;font-size: 14px;">&nbsp;${storejermsg.allscore }</span></p>
			</div>
		</div>
		
		
		
	<%-- 	
		<div style="text-align: center;margin-top: 10%;">
	 	
			
			
			<div class="p1" style="margin-top: 40px;">
				<span style="margin-right: 7px;">————</span>我对他的评价<span style="margin-left: 7px;">————</span>
			</div>
			<div class="show_number clearfix" >
				<div class="atar_Show">
		          <p tip="${jiuEvaluateLogs.starNumTwo}"></p>
		        </div>
			</div>
			<div style="margin-top: 40px;">
			<ul class="ui-choose" multiple="multiple" id="uc_03" style="margin-bottom: 80px;">
				<c:forEach items="${words1}" var="words">
					<li>${words}</li>
				</c:forEach>				
			</ul>
			</div>
		</div> --%>
			<!--门店对工厂评价-->
		<div style="border-bottom: 10px solid #eee;border-top: 10px solid #eee;margin-top: 10px;padding-bottom: 10px;">
				<div>
				<p style="margin: 10px;color: #666;">他的对我的主评价</p>
				</div>
			<div class="pingbox2" style="border-bottom: 1px solid #eee;padding-bottom: 10px;margin-top: 0px;">
			
				<div>
					<span class="username1">${storejermsg.name}</span>
					<span >
						<img src="${ctxStatic }/jiu/ratingimg/${storejermsg.creditRating.ratingpic }" style="height: 15px;"/>
					</span>
				<p style="color: #afafaf;font-size: 12px;"><fmt:formatDate value="${jiuEvaluateLogs.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></p>
				</div>
				<div>
					<div class="zhibiao2">
						<p>接单服务 <span>${jiuEvaluateLogs.starNum}</span></p>
						<p>生产质量 <span>${jiuEvaluateLogs.starNumTwo}</span></p>
						<p>配送速度 <span>${jiuEvaluateLogs.starNumThird}</span></p>
					</div>
				</div>
			</div>
			<div style="margin: 10px;">
			
						<c:forEach items="${words1}" var="words">
							<li>${words}</li>
						</c:forEach>
					
			
			</div>
			<!-- <div class="answer_text">
				<p>厂家回复：谢谢你对我们的评价，很高兴很荣幸你们选择我们的商品，希望下次再次合作</p>
				<i></i>
			</div> -->
		</div>
		
		
		<c:if test="${jiuEvaluateLogs.subevaluateLogList ne null }">
	<%-- 	<c:forEach  items="${jiuEvaluateLogs.subevaluateLogList }"  var="sub">
		
		<c:if test="${sub.type eq 1 }">
			<div class="answer_text" style="margin: 10px;">
							<li>${sub.content}</li>
							<li>${sub.crTime}</li>
			</div>
		</c:if>
		<c:if test="${sub.type ne 1 }">
			<div  style="margin: 10px;">
							<li>${sub.content}</li>
							<li>${sub.crTime}</li>
			</div>
		</c:if>
		</c:forEach>
		 --%>
		
		<div style="margin-top: 10px;">
			<c:forEach  items="${jiuEvaluateLogs.subevaluateLogList }"  var="sub">
			<c:if test="${sub.type eq 1 }">
				<div style="margin:10px;border-bottom: 1px solid #eee;padding-bottom: 10px;">
				<div class="answer_text" style="color: #888;">
					<p>门店[${sub.identity == "1" ? "管理员" : sub.identity == "2" ? "传图设计师" :"财务"}]评价：${sub.content}</p>
					<i></i>
				</div>
				<p style="color: #afafaf;font-size: 12px;text-align: right;"><fmt:formatDate value="${sub.crTime}" pattern="yyyy-MM-dd HH:mm:ss"/></p>
				</div>
			</c:if>
			<c:if test="${sub.type eq 2 }">
				<div style="margin:10px;border-bottom: 1px solid #eee;padding-bottom: 10px;">
				<div >
				${identity == sub.identity  ? "我" : sub.identity == "1" ? "我方[管理员]" : sub.identity == "2" ? "我方[传图设计师]" :"我方[财务]" }
					:${sub.content}
				</div>
				<p style="color: #afafaf;font-size: 12px;text-align: right;"><fmt:formatDate value="${sub.crTime}" pattern="yyyy-MM-dd HH:mm:ss"/></p>
				</div>
			</c:if>
			</c:forEach>
		</div>
	
		
		</c:if>
		
		
		
		
		
		
		
		
		
		<div style="">
			<div style="margin: 10px;margin-top: 20px;margin-bottom:80px" >
				<textarea style="border: 1px solid #eee;display: ;" id="word" placeholder="亲，你可以对店家进行回复" class="neirong"></textarea>
			</div>
			<div style="margin: 0 15px;position: fixed;bottom: 20px;right: 10px;left: 10px;z-index: 999999;background-color: #fff;">
			
				<button class="pingjia_btn"  onclick="addsub();">发表回复</button>
			</div>
		</div
		
		
		<script type="text/javascript" src="js/startScore.js"></script>
		
		
		
		
	     
	</body>
	<script type="text/javascript">
		
			function addsub(){
				
			;
					var evaluateWordIds=$("#word").val();
					if(evaluateWordIds == ""){
						   $('#myModal').modal('show')  ;
	                 	    $(".modal-body").text("请输入评价内容");
					}else{
						$.ajax({
							type: 'POST',
							url: "${ctxFront }/jiu/ajaxaddSubEvaluate",
							dataType: "json",
							cache:true,
							async:false,
							data: {uid:"${uid}",orderId:"${jiuOrder.id}",type:"${type}",content:evaluateWordIds},
							success: function (data) {
								 $('#myModal').modal('show')  ;
			                 	    $(".modal-body").text(data.message);
			                 	    $("#yes").click(function(){
			                 	    	  if(data.msg=='success'){
						                    	 window.location.href="${ctxFront }/jiu/addSubEvaluate?uid=${uid}&orderId=${jiuOrder.id}&type=${type}";
						                     }
			                 	    });
			                   
							}
						});	
					}
				}
				
		
		
		</script>
</html>